#pragma once

#ifdef SP_PLATFORM_WINDOWS
	#ifdef SP_BUILD_DLL
		#define SPRING_API __declspec(dllexport)
	#else
		#define SPRING_API __declspec(dllimport)
	#endif // SP_BUILD_DLL
#else
#error Spring only support Windows!
#endif // SP_PLATFORM_WINDOWS

#ifdef SP_ENABLE_ASSERTS
	#define SP_ASSERT(x, ...) { if(!(x)) { SP_ERROR("Assertion Failed: {0}", __VA_ARGS__); __debugbreak(); } }
	#define SP_CORE_ASSERT(x, ...) { if(!(x)) {SP_CORE_ERROR("Assertione Failed:{0}", __VA_ARGS__); __debugbreak(); } }
#else
	#define SP_ASSERT(x, ...)
	#define SP_CORE_ASSERT(x, ...)
#endif // SP_ENABLE_ASSERTS

#define BIT(x) (1 << x)